package com.quick.tim.mobileserviceprovider.entity;
// Generated 5 Jun, 2013 6:08:00 PM by Hibernate Tools 3.2.1.GA


import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * ExamQuestionsAnswers generated by hbm2java
 */
@Entity
@Table(name="exam_questions_answers", schema="public"
)
public class ExamQuestionsAnswers  implements java.io.Serializable {


     private int questionId;
     private ExamEntry examEntry;
     private int questionType;
     private String question;
     private int marksForQuestion;
     private String option1;
     private String option2;
     private String option3;
     private String option4;
     private String ans;
     private Set<ExamStudentResponse> examStudentResponses = new HashSet<ExamStudentResponse>(0);

    public ExamQuestionsAnswers() {
    }

	
    public ExamQuestionsAnswers(int questionId) {
        this.questionId = questionId;
    }
    public ExamQuestionsAnswers(int questionId, ExamEntry examEntry, int questionType, String question, int marksForQuestion, String option1, String option2, String option3, String option4, String ans, Set<ExamStudentResponse> examStudentResponses) {
       this.questionId = questionId;
       this.examEntry = examEntry;
       this.questionType = questionType;
       this.question = question;
       this.marksForQuestion = marksForQuestion;
       this.option1 = option1;
       this.option2 = option2;
       this.option3 = option3;
       this.option4 = option4;
       this.ans = ans;
       this.examStudentResponses = examStudentResponses;
    }
   
     @Id 
    
    @Column(name="question_id", unique=true, nullable=false)
    public int getQuestionId() {
        return this.questionId;
    }
    
    public void setQuestionId(int questionId) {
        this.questionId = questionId;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="ex_id")
    public ExamEntry getExamEntry() {
        return this.examEntry;
    }
    
    public void setExamEntry(ExamEntry examEntry) {
        this.examEntry = examEntry;
    }
    
    @Column(name="question_type")
    public int getQuestionType() {
        return this.questionType;
    }
    
    public void setQuestionType(int questionType) {
        this.questionType = questionType;
    }
    
    @Column(name="question", length=400)
    public String getQuestion() {
        return this.question;
    }
    
    public void setQuestion(String question) {
        this.question = question;
    }
    
    @Column(name="marks_for_question")
    public int getMarksForQuestion() {
        return this.marksForQuestion;
    }
    
    public void setMarksForQuestion(int marksForQuestion) {
        this.marksForQuestion = marksForQuestion;
    }
    
    @Column(name="option1", length=200)
    public String getOption1() {
        return this.option1;
    }
    
    public void setOption1(String option1) {
        this.option1 = option1;
    }
    
    @Column(name="option2", length=200)
    public String getOption2() {
        return this.option2;
    }
    
    public void setOption2(String option2) {
        this.option2 = option2;
    }
    
    @Column(name="option3", length=200)
    public String getOption3() {
        return this.option3;
    }
    
    public void setOption3(String option3) {
        this.option3 = option3;
    }
    
    @Column(name="option4", length=200)
    public String getOption4() {
        return this.option4;
    }
    
    public void setOption4(String option4) {
        this.option4 = option4;
    }
    
    @Column(name="ans", length=32)
    public String getAns() {
        return this.ans;
    }
    
    public void setAns(String ans) {
        this.ans = ans;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="examQuestionsAnswers")
    public Set<ExamStudentResponse> getExamStudentResponses() {
        return this.examStudentResponses;
    }
    
    public void setExamStudentResponses(Set<ExamStudentResponse> examStudentResponses) {
        this.examStudentResponses = examStudentResponses;
    }




}


